<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var timer1 = new Date().getTime()
        var timer2 = new Date('2023/1/1 0:0:0').getTime()
        var time = timer2 - timer1
        console.log(time)
        // console.log(day, hour, min, second)
    </script>
</body>

</html>